﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
	xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
	mc:Ignorable="d"
	x:Class="SeismicResponseSpectrum.Ui.StretchButton"
	x:Name="UserControl"
	d:DesignWidth="50" d:DesignHeight="50" Width="50" Height="50" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" RenderTransformOrigin="0.5,0.5" Opacity="0.3" Background="{x:Null}" BorderBrush="{x:Null}">
    <UserControl.Resources>
		<Storyboard x:Key="Grow">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
				<EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="1.1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
				<EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="1.1"/>
			</DoubleAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="LayoutRoot">
				<EasingColorKeyFrame KeyTime="0:0:0.05" Value="#7EFFFFFF"/>
			</ColorAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="UserControl">
				<EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shrink">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
				<EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
				<EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="LayoutRoot">
				<EasingColorKeyFrame KeyTime="0:0:0.05" Value="#19FFFFFF"/>
			</ColorAnimationUsingKeyFrames>

			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="UserControl">
				<EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="0.3"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
    <UserControl.RenderTransform>
		<TransformGroup>
			<ScaleTransform/>
			<SkewTransform/>
			<RotateTransform/>
			<TranslateTransform/>
		</TransformGroup>
	</UserControl.RenderTransform>
    <UserControl.Triggers>
		<EventTrigger RoutedEvent="UIElement.MouseEnter">
			<BeginStoryboard Storyboard="{StaticResource Grow}"/>
		</EventTrigger>
		<EventTrigger RoutedEvent="UIElement.MouseLeave">
			<BeginStoryboard x:Name="Shrink_BeginStoryboard" Storyboard="{StaticResource Shrink}"/>
		</EventTrigger>
	</UserControl.Triggers>

	<Grid x:Name="LayoutRoot" RenderTransformOrigin="0.5,0.5" Background="#19FFFFFF">
		<Grid.RenderTransform>
			<TransformGroup>
				<ScaleTransform/>
				<SkewTransform/>
				<RotateTransform/>
				<TranslateTransform/>
			</TransformGroup>
		</Grid.RenderTransform>
		<Grid.RowDefinitions>
			<RowDefinition Height="3*"/>
			<RowDefinition Height="14*"/>
			<RowDefinition Height="8*"/>
			<RowDefinition Height="8*"/>
			<RowDefinition Height="14*"/>
			<RowDefinition Height="3*"/>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="3*"/>
			<ColumnDefinition Width="14*"/>
			<ColumnDefinition Width="8*"/>
			<ColumnDefinition Width="8*"/>
			<ColumnDefinition Width="14*"/>
			<ColumnDefinition Width="3*"/>
		</Grid.ColumnDefinitions>
		<Path Data="M93.338158,0 L233.3454,0 233.3454,140.00761 198.34361,105.0057 70.003623,233.346 2.8421708E-14,163.3422 128.33999,35.001899 z" Fill="#FF3E3E3E" Stretch="Fill" StrokeThickness="100" Grid.Column="3" Grid.RowSpan="3" Grid.ColumnSpan="3"/>
		<Path Data="M93.338158,0 L233.3454,0 233.3454,140.00761 198.34361,105.0057 70.003623,233.346 2.8421708E-14,163.3422 128.33999,35.001899 z" Fill="#FF3E3E3E" Stretch="Fill" StrokeThickness="100" Grid.Row="3" RenderTransformOrigin="0.5,0.5" Margin="0,0,0,-0.001" Grid.RowSpan="3" Grid.ColumnSpan="3">
			<Path.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleY="-1" ScaleX="-1"/>
					<SkewTransform AngleY="0" AngleX="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform/>
				</TransformGroup>
			</Path.RenderTransform>
		</Path>
		<Rectangle Grid.Column="5" Fill="#FF3E3E3E" Grid.Row="2" Grid.RowSpan="4"/>
		<Rectangle Grid.ColumnSpan="4" Grid.Column="2" Fill="#FF3E3E3E" Grid.Row="5"/>
		<Rectangle Grid.ColumnSpan="4" Fill="#FF3E3E3E"/>
		<Rectangle Fill="#FF3E3E3E" Grid.RowSpan="4"/>
	</Grid>
</UserControl>